//
//  DataOfNewTopic.m
//  Gift
//
//  Created by li cheng on 16/09/20
//  Copyright (c) Apon. All rights reserved.
//

#import "DataOfNewTopic.h"
#import "CategoryOfDataNewTopic.h"
#import "UserOfDataNewTopic.h"
@implementation DataOfNewTopic
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"category"]) {
        _category = [CategoryOfDataNewTopic modelDic:value];
    }
    if ([key isEqualToString:@"user"]) {
        _user = [UserOfDataNewTopic modelDic:value];
    }
}
- (void)setValue:(id)value forUndefinedKey:(nonnull NSString *)key{
    [super setValue:value forUndefinedKey:key];
    if ([key isEqualToString:@"id"]) {
        self.ID = value;
    }
    if ([key isEqualToString:@"description"]) {
        self.myDescription = value;
    }
}
@end
